;;; init-lisp.el --- elisp config -*- lexical-binding:t -*-
;;; Commentary:
;;; Code:

;; emacs lisp 语言设置
(use-package elisp-mode
  :defer t
  :ensure nil
  :delight "ξ ")

(leader-key emacs-lisp-mode-map
  "m" '(:ignore t :wk "lang")
  "mx" '(quickrun :wk "run buffer")
  "me" '(eval-last-sexp :wk "run sexp"))

(use-package ielm
  :defer t
  :ensure nil)

(use-package highlight-defined
  :hook ((emacs-lisp-mode
          ielm-mode) . highlight-defined-mode)
  :init (setq highlight-defined-face-use-itself t))

;; eldoc
(use-package eldoc
  :defer t
  :ensure nil
  :diminish
  :hook (prog-mode . eldoc-mode))

;; racket 语言设置
(use-package racket-mode
  :defer t)

;; lisp 系语言
(use-package paredit
  :defer t
  :diminish
  :hook ((racket-mode
          racket-repl-mode
          emacs-lisp-mode) . paredit-mode))

(leader-key racket-mode-map
  "m" '(:ignore t :wk "lang")
  "mx" '(quickrun :wk "run")
  "mX" '(racket-run-module-at-point :wk "compile")
  "md" '(racket-run-with-debugging :wk "debug")
  "mp" '(racket-repl :wk "repl")
  "mt" '(racket-test :wk "test")
  "ml" '(racket-logger :wk "logger")
  "mo" '(racket-profile :wk "profile")
  )

(provide 'init-lisp)
;;; init-lisp.el ends here
